lexer grammar ANTLRLexer;

options {
  language = Java;
}

@header {
    package es.etsii.pl.P6_Flexer;
}

BLANCO: (' ' | '\t' | '\r' | '\n') { $channel=HIDDEN; };

fragment DIGITO: '0'..'9';
fragment MAYUSC: ('A'..'Z'); //| '_';
fragment MINUSC: ('a'..'z'); //| '_';
ENDFILE: 'EOF';
TERMINAL : MAYUSC (MAYUSC | DIGITO | '_')*;
NO_TERMINAL:  MINUSC (MINUSC | DIGITO | '_')*;
CADENA: '\"' (~('\"'))* '\"';

COLON: ':';
SEMICOLON: ';';
QUESTION: '?';
PLUS: '+';
ASTERISK: '*';
OR: '|';
LPARENTHESIS: '(';
RPARENTHESIS: ')';

COMMENT_LINE: '//' (options {greedy=false;}:.)* ('\r' | '\n') { $channel=HIDDEN; };
COMENTARIO: '/*' (options {greedy=false;}:.)* '*/' { $channel=HIDDEN; };
